Communication apparatus, communication method, and storage medium

ABSTRACT

A communication apparatus executes an authentication process with a first other communication apparatus based on information acquired from an image obtained by capturing code information of the communication apparatus and receives, from the first other communication apparatus, first information shared between the first other communication apparatus and a second other communication apparatus. The communication apparatus transmits a search signal including second information based on the received first information and has a smaller amount of information than the first information, and transmits the first information to the second other communication apparatus in a case where a response signal in response to the search signal is received from the second other communication apparatus, and then executes a setting process for setting a communication parameter for communicating with the second other communication apparatus.

BACKGROUND Field

The present disclosure relates to a communication technique.

Description of the Related Art

In order for a communication apparatus to connect to a wireless networkand perform communication, it is necessary to set various communicationparameters such as an encryption method, an encryption key, anauthentication method, and an authentication key. Japanese PatentApplication Laid-Open No. 2014-60623 discusses a technique forfacilitating the setting of these communication parameters. In JapanesePatent Application Laid-Open No. 2014-60623, a communication apparatusdisplays a Quick Response (QR) Code® including information of acommunication parameter. Then, the QR Code® is read by capturing the QRCode®, and the read communication parameter is set for an access point.

The Wireless Fidelity (Wi-Fi®) Alliance, which is an industryorganization for a wireless local area network (LAN), has standardized atechnique termed Wi-Fi Protected Setup™ (WPS), in which a communicationparameter is automatically set between devices. Japanese PatentApplication Laid-Open No. 2015-220629 discusses a technique for settinga communication parameter using WPS. In WPS, information for use inprocessing performed using WPS is transmitted by being added as anInformation Element (hereinafter, an “IE”) to a wireless LAN frame.

Japanese Patent Application Laid-Open No. 2014-60623 discusses setting acommunication parameter using the capturing of code information thatencodes a large amount of information, such as a two-dimensional code,whereby it is possible to reduce complicated input by a user.

It is possible to transmit information necessary to set a communicationparameter using the capturing of code information by adding theinformation to a communication frame as in WPS. If, however, theinformation is transmitted by adding an information element to acommunication frame, a wireless resource (band) can become limited.

For example, in a case where a search is performed for a desiredcommunication partner apparatus, a communication frame to whichinformation necessary to set a communication parameter is added istransmitted by broadcast. Then, a plurality of apparatuses receivingthis communication frame can transmit response signals. In this case, ifeach apparatus transmitting a response signal also transmits acommunication frame to which an information element is added, thewireless resource can become more limited.

Thus, in a case where information necessary to set a communicationparameter using the capturing of code information is added to acommunication frame, it is desirable that the information should have asmaller amount of information to reduce limiting the wireless resource.

SUMMARY

According to an aspect of an embodiment, a communication apparatusincludes a first execution unit configured to, based on informationacquired from a captured image corresponding to the communicationapparatus, execute with a first other communication apparatus anauthentication process for the first other communication apparatus tomediate wireless connection between the communication apparatus and asecond other communication apparatus, a reception unit configured to,according to the authentication process executed by the first executionunit, receive, from the first other communication apparatus, firstinformation for the wireless connection with the second othercommunication apparatus, a first transmission unit configured totransmit by broadcast a search signal including second information basedon the received first information, has a smaller amount of informationthan the received first information, and is used to search for thesecond other communication apparatus, a second transmission unitconfigured to transmit by unicast the received first information to thesecond other communication apparatus in a case where a response signalin response to the search signal transmitted by the first transmissionunit is received from the second other communication apparatus, and asecond execution unit configured to, after the second transmission unittransmits the received first information, execute a setting process forsetting a communication parameter for wirelessly connecting to thesecond other communication apparatus and communicating with the secondother communication apparatus.

According to an aspect of an embodiment, a communication apparatusincludes a first execution unit configured to, based on informationacquired from a captured image corresponding to the communicationapparatus, execute with a first other communication apparatus anauthentication process for the first other communication apparatus toobtain authority to mediate wireless connection between thecommunication apparatus and a second other communication apparatus, anacquisition unit configured to, according to the authentication processexecuted by the first execution unit, acquire, from the first othercommunication apparatus, first information provided for the second othercommunication apparatus by the first other communication apparatus in aprocess in which the first other communication apparatus mediates thewireless connection between the communication apparatus and the secondother communication apparatus, a reception unit configured to receivefrom the second other communication apparatus a search signaltransmitted by broadcast and including second information based on theacquired first information, has a smaller amount of information than theacquired first information, and is used by the second othercommunication apparatus to search for the communication apparatus, atransmission unit configured to transmit a response signal to the secondother communication apparatus, in a case where the reception unitreceives the search signal including the second information, and asecond execution unit configured to, in a case where the received firstinformation is received by unicast from the second other communicationapparatus after the response signal is transmitted by the transmissionunit, execute a setting process for setting a communication parameterfor wirelessly connecting to the second other communication apparatusand communicating with the second other communication apparatus.

Further features will become apparent from the following description ofexemplary embodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating a configuration of a communicationsystem according to the present exemplary embodiment.

FIG. 2 is a diagram illustrating a configuration of a communicationapparatus.

FIG. 3 is a diagram illustrating a sequence chart of the communicationsystem.

FIG. 4 is a flowchart illustrating a flow of processing of a smartphone.

FIG. 5 is a flowchart illustrating a flow of processing of a printer.

FIG. 6 is a flowchart illustrating a flow of a search request signaltransmission process of the printer.

FIG. 7 is a flowchart illustrating a flow of processing of an accesspoint.

DESCRIPTION OF THE EMBODIMENTS

With reference to the drawings, a communication apparatus according tothe present exemplary embodiment is described in detail below. Adescription is provided below of an example where a wireless local areanetwork (LAN) system compliant with the Institute of Electrical andElectronics Engineers (IEEE) 802.11 series is used. The communicationform, however, is not necessarily limited to a wireless LAN compliantwith the IEEE 802.11 series. Alternatively, the present exemplaryembodiment is also applicable to a communication apparatus compliantwith another wireless communication method such as Bluetooth®, nearfield communication (NFC), or ZigBee. Yet alternatively, the presentexemplary embodiment is also applicable to a communication apparatuscompliant with a wired communication method such as a wired LAN.

FIG. 1 illustrates a configuration of a communication system accordingto the present exemplary embodiment. FIG. 1 illustrates a smartphone 101and an access point (hereinafter, “AP”) 102, which is a base station.FIG. 1 also illustrates a printer 103 and a wireless network 104, whichis formed between the apparatuses in this communication system. In thepresent exemplary embodiment, the wireless network 104 illustrated inFIG. 1 is a wireless LAN compliant with the IEEE 802.11 series. Thewireless network 104 is a communication network formed by the AP 102.

In the present exemplary embodiment, the AP 102 operates as an accesspoint in an infrastructure mode defined by the IEEE 802.11 standard.Further, each of the other apparatuses operates as a station (STA) inthe infrastructure mode defined by the IEEE 802.11 standard. Thedescription is provided based on the assumption that the apparatuses inthe communication system according to the present exemplary embodimentare a smartphone and a printer. Alternatively, the apparatuses in thecommunication system can be other apparatuses such as a mobile phone, apersonal computer (PC), a video camera, a smartwatch, a personal digitalassistant (PDA), and a camera. Although the description is providedbased on the assumption that the number of the apparatuses in thecommunication system is three, the number of the apparatuses can be twoor four or more.

A description is provided below of a case where a communicationparameter setting process for connecting the AP 102 and the printer 103via a wireless LAN is executed via the smartphone 101. A communicationparameter includes various wireless communication parameters for makinga wireless connection and performing wireless communication incompliance with the IEEE 802.11 standard. That is, the communicationparameter includes communication parameters necessary to performwireless LAN communication, such as a Service Set Identifier (SSID) as anetwork identifier, an encryption method, a network key, an encryptionkey, an authentication method, and an authentication key. Thecommunication parameter can also include a media access control (MAC)address, a passphrase, an Internet Protocol (IP) address forcommunicating on an IP layer, and information necessary for an upperservice. The communication parameter can include any one or all of theabove parameters.

With reference to FIG. 2 , a hardware configuration of each of theapparatuses (the smartphone 101, the AP 102, and the printer 103) in thecommunication system according to the present exemplary embodiment isdescribed. FIG. 2 illustrates an entire apparatus 300. A function unit301 is hardware for the communication apparatus 300 to executepredetermined processing. For example, in a case where the communicationapparatus 300 is the smartphone 101, the function unit 301 is an imagecapture unit, includes an image sensor and a lens, and captures stillmoving images. For example, in a case where the communication apparatus300 is the AP 102, the function unit 301 is a control processing unitfor operating as a wireless LAN base station. For example, in a casewhere the communication apparatus 300 is the printer 103, the functionunit 301 is a printing unit and performs a printing process.

An operation unit 302 enables a user to provide various inputs tooperate the communication apparatus 300. The operation unit 302 stores aflag corresponding to an input in a memory such as a storage unit 306. Adisplay unit 303 displays visually recognizable information and in someinstances outputs sound. In a case where the display unit 303 displaysvisual information, the display unit 303 includes a video random-accessmemory (VRAM) for holding image data corresponding to the visualinformation to be displayed. The display unit 303 performs displaycontrol for continuing to display image data stored in the VRAM. A powersupply unit 304 is for supplying power to each piece of hardware. Thepower supply unit 304 acquires power from, for example, a battery or analternating current (AC) power supply.

A control unit 305 executes a control program stored in the storage unit306, thereby controlling the entire apparatus. The control unit 305includes a central processing unit (CPU) or a microprocessor unit (MPU).The control unit 305 can control the entire communication apparatus 300in cooperation with an operating system (OS) executed by the controlunit 305. The control unit 305 also performs control to communicate andshare a communication parameter with another communication apparatus.Various operations described below are performed by the control unit 305executing the control program stored in the storage unit 306.

The storage unit 306 stores various pieces of information such as acontrol program to be executed by the control unit 305 and informationof a communication partner apparatus. The storage unit 306 includes astorage medium such as a hard disk drive (HDD), a flash memory, anattachable and detachable Secure Digital (SD) card, a read-only memory(ROM), or a random-access memory (RAM).

An antenna 307 is an antenna that communicates in the 2.4 GHz bandand/or the 5 GHz band for performing wireless LAN communication. Acommunication unit 308 is hardware for performing wireless LANcommunication compliant with the IEEE 802.11 series. The communicationunit 308 includes a chip for performing wireless communication.

An operation of the communication system having the above configurationwill now be described. The smartphone 101 performs with the AP 102 anauthentication process, using the capturing of code information, forobtaining authority to operate as a management apparatus for mediating aprocess of setting a communication parameter for another apparatus.According to the authentication process with the AP 102, the smartphone101 shares, with the AP 102, certification information certifying thatthe smartphone 101 is the management apparatus. Then, the smartphone 101provides the printer 103 with the certification information using thecapturing of code information. The printer 103 transmits searchidentification information based on the provided certificationinformation by including the search identification information in afield determined in advance in a communication frame, and searches forthe AP 102. Detecting the AP 102 according to the search, the printer103 transmits certification information by unicast and connects to thewireless network 104 through a communication parameter setting processwith the AP 102.

With reference to a sequence chart illustrated in FIG. 3 , an operationof the communication system according to the present exemplaryembodiment is described. In FIG. 3 , after receiving a process startinstruction from the user, in F401, the smartphone 101 starts thefunction unit (image capture unit) 301. For example, the smartphone 101can, on the display unit 303, display an instruction for the user tocapture code information of an access point, such as “Please capture aQR Code® of an AP”. A QR Code® of the AP 102 can be included on a labelor sticker attached to AP 102 or in the AP's 102 instruction manual. Itcan also be displayed on AP's 102 display unit 303. That is, informationfor use in a communication parameter setting process is acquired from acaptured image of code information corresponding to an apparatus, suchas displayed code information or code information described on a label.

If the QR Code® is captured using the function unit (image capture unit)301, then in F402, the smartphone 101 decodes the QR Code® based on thecaptured image. Although the description is provided on the assumptionthat code information to be captured is a QR Code®, another type of codeinformation such as a barcode or a Computer Purpose (CP) code can beused.

In a case where information necessary for the communication parametersetting process is not included in the QR Code® captured and acquired inF402, the processing can end in an error.

The smartphone 101 acquires, as the information necessary for thecommunication parameter setting process from the code information, apublic key and an identifier of the apparatus that are information foruse in an authentication process. The identifier of the apparatus canbe, for example, an MAC address or a universally unique identifier(UUID). Using the information for use in the authentication processobtained from the captured QR Code®, the smartphone 101 generatesauthentication information for use in the authentication process. Atthis time, the QR Code® includes information of a public key, and thesmartphone 101 calculates a hash value for the public key, therebyobtaining the authentication information. A hash function used togenerate the hash value can be SHA-1, SHA-2, or MD5.

In F403, the smartphone 101 generates authentication information andthen starts the authentication process based on the generatedauthentication information. A signal to be exchanged in theauthentication process can be communicated in the state of beingencrypted using the Diffie-Hellman (DH) key exchange method or a publickey encryption method. In the authentication process, the smartphone 101transmits to the AP 102 an authentication request signal requesting anauthentication process. At this time, the authentication request signaluses an action frame defined by the IEEE 802.11 series. The presentexemplary embodiment, however, is not limited to this. Alternatively, anExtensible Authentication Protocol (EAP) signal can be used, or awireless LAN packet such as a probe request other than an EAP signal canbe used. This authentication request signal includes the generatedauthentication information. The authentication request signal can betransmitted by unicast, using the identifier of the apparatus obtainedfrom the code information. Further, the authentication request signalcan include, in addition to the authentication information, anotherpiece of information for use in the authentication process, such asrandom numbers, an encryption key, e.g., a public key of the smartphone101, or an apparatus name.

If receiving the authentication request signal, the AP 102 compares theauthentication information included in the authentication request signalwith authentication information generated based on a public key of theAP 102 itself, thereby performing authentication. If the authenticationinformation included in the received authentication request signalmatches the generated authentication information, authentication in theauthentication process is successful. The AP 102 then transmits anauthentication response signal indicating the authentication result.

The smartphone 101 waits for the authentication response signalincluding the result of the authentication process in the AP 102 and theauthentication information generated by the AP 102. Upon receipt of theauthentication response signal, the smartphone 101 performsauthentication based on information included in the receivedauthentication response signal. In this authentication, for example,authentication can be performed using a public key encryption method,and both apparatuses can share a common key that is the same encryptionkey. The smartphone 101 can perform authentication by determiningwhether the authentication information included in the receivedauthentication response signal matches the generated authenticationinformation. If the authentication information included in the receivedauthentication response signal matches the generated authenticationinformation, the authentication in the authentication process issuccessful. Further, the smartphone 101 transmits an authenticationconfirmation signal indicating the authentication result.

The smartphone 101 determines whether the authentication process issuccessful. If the authentication process is unsuccessful, theprocessing ends in an error. If the authentication process issuccessful, the smartphone 101 is in the state of, as a result of thesuccessful authentication process, holding a shared key for use in thesubsequent cryptographic communication, together with the AP 102.

If the authentication process ends, the smartphone 101 transmits to theAP 102 the authentication confirmation signal indicating the success orfailure of the authentication process. If the authentication process issuccessful, the smartphone 101 shares, with the AP 102, thecertification information certifying that the smartphone 101 obtainsauthority as a management apparatus. The sharing of the certificationinformation can be performed by providing the AP 102 with informationgenerated by the smartphone 101, or providing the smartphone 101 withinformation generated by the AP 102.

The certification information is encrypted using the common key sharedin the authentication process. This can improve security for exchangingthe certification information.

If the AP 102 acquires the certification information by the aboveprocessing, the AP 102 registers the smartphone 101 as the managementapparatus of the network. The management apparatus is an apparatushaving authority to mediate the setting of a communication parameter foranother apparatus using the capturing of code information. That is, theapparatus successfully authenticated in the above authentication processwith the AP 102 can obtain authority as the management apparatus.

The certification information shared between the apparatuses can includethe public key of the smartphone 101 and/or the public key of the AP102. The certification information can also include a communicationparameter for communicating in the wireless network 104 formed by the AP102. The certification information can also include channel informationindicating a frequency band of the wireless network 104 formed by the AP102.

The certification information can include identification information ofthe smartphone 101 and/or the AP 102. The certification information caninclude information for generating a communication parameter forcommunicating in the wireless network 104 formed by the AP 102. Thecertification information can include the authentication information foruse in the above authentication process. The certification informationcan include the common key generated according to the aboveauthentication process. The certification information can includeidentification information for the communication parameter settingprocess. The certification information can include priority informationindicating the priority of the communication parameter setting process.The certification information can include identification information ofthe wireless network 104 formed by the AP 102.

Based on a communication parameter provided by the smartphone 101 in acase where the authentication process is successful, the AP 102 can formthe wireless network 104.

The smartphone 101 and the AP 102 generate search identificationinformation based on the certification information. The searchidentification information is, in a case where the management apparatusmediates the setting of a communication parameter for another apparatususing the capturing of code information, information used by anotherapparatus to search for an access point or a wireless network as aconnection target. The search identification information can be uniquelyand randomly generated based on the certification information. Thesearch identification information can be generated by calculating a hashvalue for authentication information, using a hash function. The sharingof the search identification information can be performed by providingthe AP 102 with information generated by the smartphone 101, orproviding the smartphone 101 with information generated by the AP 102.Alternatively, the search identification information can be generated byeach of the smartphone 101 and the AP 102.

Upon acquiring the certification information, the AP 102 stores thesmartphone 101 as the management apparatus. The AP 102 registers the MACaddress of the smartphone 101, the certification information, theauthentication information, and/or the common key in association witheach other in a management apparatus list.

A description will not be provided of an operation in which thesmartphone 101, having obtained authority as the management apparatus,mediates a process of connecting the printer 103 to the wireless network104. In F404, if instructed by the user to set a communicationparameter, the printer 103 displays a QR Code® including informationnecessary to set the communication parameter.

If instructed by the user to set a communication parameter for anotherapparatus, the smartphone 101 starts the function unit (image captureunit) 301. After the process illustrated in F403 with the AP 102 ends,the smartphone 101 can automatically start the function unit (imagecapture unit) 301. In this case, the smartphone 101 can sequentiallynavigate the user to “Please capture a QR Code® of an AP” and “Pleasecapture a QR Code® of a printer” on the display unit 303 of thesmartphone 101.

In F405, the smartphone 101 captures the QR Code® displayed on theprinter 103 and acquires, from the QR Code®, information necessary toset the communication parameter. Using the information obtained from theQR Code®, the smartphone 101 generates authentication information foruse in an authentication process. The smartphone 101 performs theauthentication process with the printer 103 based on the generatedauthentication information. If the authentication process is successful,then in F406, the smartphone 101 provides the printer 103 with thecertification information shared with the AP 102. The authenticationprocess in F406 is similar to the process described in F403.

If sharing the certification information, the smartphone 101 and theprinter 103 also share search identification information. The smartphone101 and the printer 103 share the search identification informationshared between the smartphone 101 and the AP 102. The sharing of thesearch identification information can be performed by the smartphone 101providing the printer 103 with the search identification informationshared with the AP 102. Alternatively, the search identificationinformation can be generated by the printer 103 based on thecertification information. The search identification information has asmaller amount of information than the certification information.

After acquiring the search identification information and thecertification information, in F407, the printer 103 transmits, bybroadcast, a search request signal for searching for the AP 102 as aconnection target. The search request signal transmitted in F407includes the search identification information. The search requestsignal uses, for example, an action frame defined by the IEEE 802.11series. The present exemplary example however, is not limited to this.Alternatively, an EAP signal can be used or a wireless LAN packet suchas a probe request other than the EAP signal can be used.

The search identification information is transmitted by being includedin a field determined in advance in a frame for use in communication.The search identification information is transmitted by, for example,being added to a field including the MAC address of the transmissiondestination or the transmission source. The MAC address is informationusing 48 bits. That is, if transmitted by being added to the field ofthe MAC address, the search identification information uses 48 bits.Thus, the amount of information is reduced as compared with a case wherea dedicated IE indicating the communication parameter setting processused in the code information is added.

The search identification information can be transmitted by, forexample, being added to a field including a Basic Service Set Identifier(BSSID) or an SSID as a network identifier. The BSSID uses 48 bits (6octets), and the SSID uses 32 octets. Thus, if transmitted by beingadded to the field of the BSSID, the search identification informationuses 48 bits (6 octets). Thus, the amount of information is reduced ascompared with a case where a dedicated IE is added. If transmitted bybeing added to the field of the SSID, the search identificationinformation uses 32 octets. Thus, the amount of information is reducedas compared with a case where a dedicated IE is added. The searchidentification information can be added to, for example, a fieldincluding a Homogeneous Extended Service Set Identifier (HESSID) definedby IEEE 802.11u. The HESSID uses 6 octets.

Upon receipt of the search request signal from the printer 103, the AP102 acquires information added to the field including the searchidentification information. The AP 102 compares the information added tothe field including the search identification information with thesearch identification information shared with the apparatus registeredas the management apparatus. If the information added to the fieldincluding the search identification information matches the searchidentification information shared with the apparatus registered as themanagement apparatus, the AP 102 transmits a response signal. If theinformation added to the field including the search identificationinformation does not match the search identification information sharedwith the apparatus registered as the management apparatus, the AP 102does not transmit a response signal.

The response signal uses, for example, an action frame defined by theIEEE 802.11 series. The present exemplary embodiment however, is notlimited to this. Alternatively, an EAP signal can be used or a wirelessLAN packet such as a probe response other than the EAP signal can beused. The AP 102 transmits the response signal by adding the searchidentification information to a field including predeterminedidentification information such as an MAC address or a networkidentifier. As described above, a scanning process in a communicationparameter setting process performed using the capturing of codeinformation is executed by adding information indicating the scanningprocess to a field defined in advance in an existing communication framein the state where the amount of information is reduced. Thus, it is notnecessary to provide an IE, which leads to the addition of an amount ofinformation, in information for use in the scanning process, and it ispossible to detect a desired communication partner while increasing theavailability of a wireless resource.

Since the information added to the field including the searchidentification information matches the search identification informationshared with the smartphone 101 that is registered as the managementapparatus, in F408, the AP 102 transmits a response signal.

That is, based on the search identification information, the AP 102 candetermine whether the printer 103 is a target apparatus of thecommunication parameter setting process. Upon receipt of the responsesignal in response to the search request signal, the printer 103extracts information from the field including the search identificationinformation in the received response signal. The printer 103 determineswhether the extracted information matches the search identificationinformation included in the search request signal transmitted in F407.If the extracted information does not match the search identificationinformation, the printer 103 can transmit a search request signal, orthe processing can end in an error.

If the information extracted from the response signal matches the searchidentification information included in the search request signaltransmitted in F407, then in F409, the printer 103 transmits thecertification information by unicast to the AP 102 as the transmissionsource of the response signal. Upon receipt of the certificationinformation, in F410, based on whether the certification informationheld in the AP 102 matches the received certification information, theAP 102 determines whether the communication parameter setting process isto be executed with the printer 103. If the certification informationheld in the AP 102 matches the received certification information, theAP 102 determines that the communication parameter setting process is tobe executed. In the determination in F410, it can be determined whetherthe printer 103 can connect to the wireless network 104. Since thesearch identification information has an amount of information reducedfrom the certification information, it is determined, based on thecertification information having a larger amount of information, whetherthe communication parameter setting process is to be executed, wherebyit is possible to improve security. The certification information isexchanged by unicast, whereby it is possible to minimize the use of awireless resource.

The AP 102 checks whether an apparatus indicated by administratorinformation included in the received certification information is theregistered management apparatus. The AP 102 permits the connection ofthe transmission source of the certification information including theadministrator information indicating the registered managementapparatus, and does not permit the connection of the transmission sourceof a connection request signal including the administrator informationindicating a management apparatus that is not registered. Further, theAP 102 executes the communication parameter setting process with thetransmission source of the certification information including theadministrator information indicating the registered managementapparatus, and does not execute the communication parameter settingprocess with the transmission source of the certification informationincluding the administrator information indicating a managementapparatus that is not registered.

In F411, the AP 102 transmits, to the printer 103, a notificationindicating the result of the determination in F410. The informationtransmitted in F411 can include the certification information. Thenotification in F411 indicates that the communication parameter settingprocess is to be executed.

In F412, the AP 102 and the printer 103 execute the communicationparameter setting process, in which the apparatuses share acommunication parameter for communicating in the wireless network 104.In F412, the AP 102 provides the communication parameter for the printer103. The communication parameter setting process in F412 can be a 4-wayhandshake executed based on a pre-shared key included in theauthentication information. In the communication parameter settingprocess in F412, both the AP 102 and the printer 103 can be encrypted bythe encryption key shared according to the authentication process withthe smartphone 101. The printer 103 is enabled to connect to the AP 102based on the acquired communication parameter.

With reference to a flowchart illustrated in FIG. 4 , an operation ofthe smartphone 101 will be described. The flowchart in FIG. 4 is startedafter the user provides, through the operation unit 302, an instructionto start the setting of a communication parameter. The flowchart in FIG.4 illustrates a flow of processing performed by the control unit 305reading and executing a computer program stored in the storage unit 306.The configuration can be such that some or all of steps in the flowchartillustrated in FIG. 4 are achieved by hardware such as anapplication-specific integrated circuit (ASIC).

Upon receipt of an instruction to start processing, in step S501, thesmartphone 101 captures a QR Code® using the function unit (imagecapture unit) 301 and decodes the captured QR Code®. Then, if thecontent of the captured QR Code® is information necessary to set acommunication parameter (YES in step S501), the processing proceeds tostep S502. If the captured QR Code® does not include informationnecessary to set a communication parameter (NO in step S501), theprocessing can end in an error. In this case, information regarding thefailure causing the end in an error or format incompatibility can beindicated on the display unit 303.

In step S502, the smartphone 101 performs an authentication processbased on information included in the QR Code®. The details of theauthentication process are similar to the contents described in F403 andF406. In step S503, the smartphone 101 determines whether theauthentication process in step S502 is successful. If the authenticationprocess is unsuccessful (NO in step S503), the processing ends. If theauthentication process is successful (YES in step S503), then in stepS504, the smartphone 101 shares the certification information and thesearch identification information with a partner apparatus. The detailsof the process of step S504 are similar to the contents described inF403 and F406.

With reference to flowcharts illustrated in FIGS. 5 and 6 , operationsof the printer 103 will now be described. The flowchart in FIG. 5 isstarted after the user provides, through the operation unit 302, aninstruction to start the setting of a communication parameter. Theflowchart in FIG. 5 illustrates a flow of processing performed by thecontrol unit 305 reading and executing a computer program stored in thestorage unit 306. The configuration can be such that some or all ofsteps in the flowcharts illustrated in FIGS. 5 and 6 are achieved byhardware such as an ASIC.

Upon receipt of an instruction to start processing, in step S601, theprinter 103 displays on the display unit 303 a QR Code® obtained byencoding information necessary for a communication parameter settingprocess. In step S602, the printer 103 determines whether anauthentication process is started. If the authentication process isstarted (YES in step S602), then in steps S603 to S605, the printer 103executes the process described in F406. If the authentication process issuccessful (YES in step S604), the apparatuses share the certificationinformation and the search identification information. Then, in stepS606, the printer 103 performs a process of transmitting a searchrequest signal for searching for a communication apparatus or a wirelessnetwork as a connection target.

With reference to the flowchart illustrated in FIG. 6 , the process ofstep S606 will now be described. In FIG. 6 , in step S701, the printer103 determines whether the printer 103 includes the identificationinformation of a search target device. The case where the printer 103includes the identification information of a search target device is acase where the printer 103 acquires the identification information ofthe search target device in the process of step S605. If the printer 103includes the identification information of a search target device (YESin step S701), the processing proceeds to step S702. If the printer 103does not include the identification information of a search targetdevice (NO in step S701), the processing proceeds to step S707.Alternatively, if it is determined that the printer 103 includes theidentification information of a search target device, the processing canproceed to step S704.

In step S702, the printer 103 determines whether the printer 103includes channel information of the search target device. The case wherethe printer 103 includes the channel information is a case where theprinter 103 acquires the channel information in the process of stepS605, similarly to the identification information of the target device.If the printer 103 includes the channel information (YES in step S702),the processing proceeds to step S703. If the printer 103 does notincludes the channel information (NO in step S702), the processingproceeds to step S704.

In step S703, since the printer 103 stores the identificationinformation and the channel information of the search target device, theprinter 103 can communicate with the search target device withoutexecuting a search process. Thus, the printer 103 determines that nosearch request signal is to be transmitted. Then, the search requestsignal transmission process ends. Even if the printer 103 stores thechannel information in step S702, the processing can proceed to stepS704. Then, the printer 103 can transmit a search request signal.

In step S704, the printer 103 determines that a search request signal isto be transmitted by unicast such that the destination is theidentification information of the search target device. Then, theprocessing proceeds to step S705. In step S705, the printer 103 performsa process of including, in the search request signal, searchidentification information for determining whether the communicationparameter setting process is to be executed with the search targetdevice. Then, in step S706, the printer 103 transmits the search requestsignal.

In step S707, the printer 103 determines that a search request signal isto be transmitted by broadcast. Then, the processing proceeds to stepS705. If the channel information is not acquired, the search requestsignal can be transmitted to all the channels. If the channelinformation is acquired, the search request signal can just betransmitted to a channel indicated by the channel information.

Alternatively, when it is determined in step S701 that the printer 103includes the identification information of a target device, theprocessing can proceed to step S703. Then, the printer 103 can determinethat no search request signal is to be transmitted. A search requestsignal can be transmitted by being encrypted by an encryption keyacquired according to the authentication process.

Referring back to FIG. 5 , in step S607, the printer 103 determineswhether the search request signal is transmitted. If the search requestsignal is not transmitted (NO in step S607), the processing proceeds tostep S610. If the search request signal is transmitted (YES in stepS607), then in step S608, the printer 103 waits to receive a searchresponse signal in response to the search request signal. If the searchresponse signal is received (YES in step S608), then in step S609, theprinter 103 determines whether the apparatus as the transmission sourceof the search response signal is a target device to be subjected to thecommunication parameter setting process. The determination in step S609can be made based on the search identification information included inthe search response signal.

If it is not determined that the transmission source of the searchresponse signal is a target device to be subjected to the communicationparameter setting process (NO in step S609), the processing ends.Alternatively, the printer 103 can perform the processes of step S606and thereafter again.

If it is determined that the transmission source of the search responsesignal is a target device to be subjected to the communication parametersetting process, then in step S610, the printer 103 transmits by unicastthe certification information acquired in step S605. In step S612, theprinter 103 determines whether a notification that the communicationparameter setting process is to be executed is received. Upon receipt ofthe notification that the communication parameter setting process is tobe executed (YES in step S612), in step S613, the printer 103 executesthe communication parameter setting process. Alternatively, based on thecertification information included in the notification received in stepS612, the printer 103 can determine whether the communication parametersetting process is to be executed. The details of the process of stepS613 are similar to the content described in F412.

With reference to a flowchart illustrated in FIG. 7 , an operation ofthe AP 102 will now be described. The flowchart in FIG. 7 is started ina case where a signal requesting an authentication process is receivedby the AP 102. The flowchart in FIG. 7 illustrates a flow of processingperformed by the control unit 305 reading and executing a computerprogram stored in the storage unit 306. The configuration can be suchthat some or all of steps in the flowchart illustrated in FIG. 7 areachieved by hardware such as an ASIC.

Upon receipt of a signal requesting an authentication process (YES instep S800), then in step S801, the AP 102 performs an authenticationprocess with the transmission source of the signal and shares theauthentication information and the search identification informationwith the transmission source. The process of step S801 is similar to theprocess described in F403. Then, in step S802, the AP 102 waits for asearch request signal. Upon receipt of the search request signal (YES instep S802), in step S803, the AP 102 determines, based on whether thesearch identification information included in the search request signalmatches the search identification information held in the AP 102,whether the transmission source of the signal is a target device of acommunication parameter setting process. If it is determined that thetransmission source of the signal is not the target device of thecommunication parameter setting process (NO in step S803), the AP 102executes the processes of step S802 and thereafter again. If it isdetermined that the transmission source of the signal is the targetdevice of the communication parameter setting process (YES in stepS803), then in step S804, the AP 102 transmits a search response signal.The search response signal includes the search identificationinformation.

In step S805, the AP 102 receives the certification information. In stepS806, based on whether the received certification information matchesthe search identification information held in the AP 102, the AP 102determines whether the communication parameter setting process is to beexecuted with the transmission source. In steps S807 and S808, the AP102 transmits a notification indicating the determination result in stepS806. The certification information can be added to the notification. Iftransmitting the notification that the communication parameter settingprocess is to be executed, then in step S809, the AP 102 executes thecommunication parameter setting process. The process of step S809 issimilar to the process of the content described in F412.

As described above, according to the present exemplary embodiment, ascanning process in a communication parameter setting process performedusing the capturing of code information is executed by addinginformation indicating the scanning process to a field defined inadvance in an existing communication frame in the state where the amountof information is reduced. Thus, it is not necessary to provide an IE,which leads to the addition of an amount of information, in informationfor use in the scanning process, and it is possible to detect a desiredcommunication partner while improving the availability of a wirelessresource.

Since search identification information has an amount of informationreduced from the certification information, it is determined, based onthe certification information having a larger amount of information,whether the communication parameter setting process is to be executed,whereby it is possible to improve security. The certificationinformation is exchanged by unicast, whereby it is possible to minimizethe use of a wireless resource.

According to the present exemplary embodiment, the smartphone 101provides each target apparatus with the search identificationinformation for searching for a target apparatus of the communicationparameter setting process, whereby it is possible to perform theparameter setting process by making effective use of a wirelessresource.

In the present exemplary embodiment, a case has been described whereinformation necessary for a communication parameter setting process isacquired from a QR Code®. The present exemplary embodiment however, isnot limited to this. Alternatively, information necessary for acommunication parameter setting process can be exchanged through secureproximity wireless communication such as NFC communication. In addition,the exchange between these apparatuses can be performed usingcommunication other than wireless LAN communication, such as Bluetooth®.Wireless communication such as IEEE 802.11 or TransferJet® can also beused.

Information necessary for a communication parameter setting process canbe exchanged through communication via a wireless local area network(WLAN), using a secure link or an action frame. At this time, the actionframe itself can be encrypted. For the encryption, for example, anycharacter string can be set between apparatuses, and then, the actionframe can be encrypted based on information of the character string. Atthis time, the smartphone 101 and a target apparatus can exchangeinformation of both apparatuses.

Displaying of a QR Code® is not limited to displaying on the displayunit 303. Alternatively, for example, a QR Code® can be included in theform of a seal/sticker/label on a housing of a communication device, canbe included in a communication device's instruction manual, or can beincluded on a packaging such as a corrugated fiberboard used toship/sell a communication device. In addition to a QR Code®, anothertwo-dimensional code such as a one-dimensional code, e.g., a barcode, ora CP code can be used. Instead of information in machine-readableformat, such as a QR Code®, information in a format readable by a usercan be used. The AP 102 or the printer 103 can include a function of aweb server to display a QR Code® on a web page.

A case has been described where the apparatuses communicate with eachother through wireless LAN communication compliant with the IEEE 802.11standard. The present exemplary embodiment however, is not limited tothis. Alternatively, the apparatuses can communicate with each otherusing a wireless communication medium such as wireless Universal SerialBus (USB), MultiBand OFDM Alliance (MBOA), Bluetooth®, ultra-band (UWB),ZigBee, or NFC. UWB includes wireless USB, wireless 1394, and WiNET.

A description has been provided of processing in which the printer 103sets a communication parameter for the AP 102. Alternatively, thesmartphone 101 can set a communication parameter. In this case, thesmartphone 101 includes a communication parameter for connecting to theAP 102, and the smartphone 101 and the printer 103 perform acommunication parameter setting process. In this case, an opposingdevice on which the printer 103 performs the communication parametersetting process is the smartphone 101. This can be achieved by thesmartphone 101 performing processing similar to the processing performedby the AP 102 in the present exemplary embodiment.

The smartphone 101 can perform a communication parameter setting processon the AP 102. This can be achieved by replacing the printer 103 and theAP 102 in the present exemplary embodiment with the AP 102 and thesmartphone 101, respectively. The smartphone 101 generates acommunication parameter for the AP 102, and the communication parameteris set for the AP 102 by the parameter setting process.

A case has been described where the AP 102 and the printer 103 connectto each other in the infrastructure mode of a wireless LAN. The presentexemplary embodiment however, is not limited to this. Alternatively, forexample, the AP 102 and the printer 103 can connect to each other in anad hoc mode of a wireless LAN, or can connect to each other using Wi-FiDirect®. When the smartphone 101 and the printer 103 include Wi-FiDirect® connection functions, the apparatuses can connect to each otherin a form of Wi-Fi Direct®. After the setting of a communicationparameter is completed, either the smartphone 101 or the printer 103operates as a Wi-Fi Direct® group owner and constructs a wirelessnetwork using a shared communication parameter. The other apparatus,which is not the group owner, connects as a Wi-Fi Direct® client to thegroup owner, whereby it is possible to establish a connection in theform of Wi-Fi Direct®.

According to the above description, information necessary to set acommunication parameter using the capturing of code information iscommunicated in the state where the information has a smaller amount ofinformation. Thus, it is possible to increase the availability of awireless resource.

OTHER EMBODIMENTS

Embodiment(s) can also be realized by a computer of a system orapparatus that reads out and executes computer executable instructions(e.g., one or more programs) recorded on a storage medium (which mayalso be referred to more fully as a ‘non-transitory computer-readablestorage medium’) to perform the functions of one or more of theabove-described embodiment(s) and/or that includes one or more circuits(e.g., application specific integrated circuit (ASIC)) for performingthe functions of one or more of the above-described embodiment(s), andby a method performed by the computer of the system or apparatus by, forexample, reading out and executing the computer executable instructionsfrom the storage medium to perform the functions of one or more of theabove-described embodiment(s) and/or controlling the one or morecircuits to perform the functions of one or more of the above-describedembodiment(s). The computer may comprise one or more processors (e.g.,central processing unit (CPU), micro processing unit (MPU)) and mayinclude a network of separate computers or separate processors to readout and execute the computer executable instructions. The computerexecutable instructions may be provided to the computer, for example,from a network or the storage medium. The storage medium may include,for example, one or more of a hard disk, a random-access memory (RAM), aread only memory (ROM), a storage of distributed computing systems, anoptical disk (such as a compact disc (CD), digital versatile disc (DVD),or Blu-ray Disc (BD)™), a flash memory device, a memory card, and thelike.

While exemplary embodiments have been described, it is to be understoodthat the invention is not limited to the disclosed exemplaryembodiments. The scope of the following claims is to be accorded thebroadest interpretation so as to encompass all such modifications andequivalent structures and functions.

This application claims the benefit of Japanese Patent Application No.2016-012864, filed Jan. 26, 2016, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A communication apparatus comprising: one or moreprocessors; and one or more memories including instructions that, whenexecuted by the one or more processors, cause the communicationapparatus to: receive an authentication request including informationregarding a public key from a first other communication apparatus;transmit an authentication response corresponding to the authenticationrequest and according to a result of authentication based on theinformation regarding the public key to the first other communicationapparatus; receive first information from the first other communicationapparatus by communication in a case where the authentication issuccessful, wherein the first information is encrypted according to afirst key, the first key being generated using at least the public key;transmit a search signal for searching for the second othercommunication apparatus by including the first information; receiveresponse information which the second other communication apparatusresponded in accordance with verification on the first informationincluded in the search signal received by the second othercommunication; execute processing to set, based on at least the firstinformation, an encryption key for connecting to a wireless networkconstructed by the second other communication apparatus in a case wherethe response information is received from the second other communicationapparatus; and connect to the second other communication apparatus aftersetting the encryption key.
 2. The communication apparatus according toclaim 1, wherein the first information is generated by the first othercommunication apparatus.
 3. The communication apparatus according toclaim 1, wherein the encryption key is set between the communicationapparatus the second other communication apparatus in the processing. 4.The communication apparatus according to claim 1, further comprising: adisplay unit configured to display an image including the informationregarding the public key, wherein the authentication is executed basedon the information regarding the public key included in the receivedauthentication request.
 5. The communication apparatus according toclaim 4, wherein the display unit is configured to display an imageincluding the information corresponding to the communication apparatusin a QR code.
 6. The communication apparatus according to claim 1,wherein one or more processors further cause the communication apparatusto receive second information to be used for the processing to set theencryption key from the first other communication apparatus.
 7. Thecommunication apparatus according to claim 6, wherein an informationamount of the first information is smaller than an information amount ofthe second information.
 8. The communication apparatus according toclaim 1, wherein the wireless network is compliant with the IEEE802.11series standard.
 9. The communication apparatus according to claim 1,wherein the first information is shared between the first othercommunication apparatus and the second other communication apparatus andthe first information is used for verification to connect the wirelessnetwork constructed by the second other communication apparatus.
 10. Thecommunication apparatus according to claim 9, one or more processorsfurther cause the communication apparatus to receive responseinformation which the second other communication apparatus responded inaccordance with verification on the first information included in thesearch signal received by the second other communication.
 11. Thecommunication apparatus according to claim 1, wherein the public key andthe encryption key are used in the authentication.
 12. The communicationapparatus according to claim 4, wherein the information included in theimage includes a MAC address of the communication apparatus and theauthentication request in received by unicast at the MAC address. 13.The communication apparatus according to claim 1, wherein thetransmission of the search signal is a unicast transmission.
 14. Thecommunication apparatus according to claim 1, wherein the communicationapparatus is a printer and the second other communication apparatus isan access point.
 15. The communication apparatus according to claim 1,the first information includes identification information on a networkformed by the second other communication apparatus.
 16. Thecommunication apparatus according to claim 1, wherein the second othercommunication apparatus executes the authentication with the first othercommunication apparatus, and shares the first information with the firstother communication apparatus in a case where the authenticationsucceeds.
 17. A communication method comprising: receiving anauthentication request including information regarding a public key froma first other communication apparatus; transmitting an authenticationresponse corresponding to the authentication request and according to aresult of authentication based on the information regarding the publickey to the first other communication apparatus; receiving firstinformation from the first other communication apparatus bycommunication in a case where the authentication is successful whereinthe first information is encrypted according to a first key, the firstkey being generated using at least the public key; transmitting a searchsignal for searching for a second other communication apparatus byincluding the first information; receiving response information whichthe second other communication apparatus responded in accordance withverification on the first information included in the search signalreceived by the second other communication; executing processing to set,based on at least the first information, an encryption key forconnecting to a wireless network constructed by the second othercommunication apparatus in a case where the response information isreceived from the second other communication apparatus; and connectingto the second other communication apparatus after setting the encryptionkey.
 18. A non-transitory computer-readable storage medium storingcomputer executable instructions for causing a computer to execute amethod, the method comprising: receiving an authentication requestincluding information regarding a public key from a first othercommunication apparatus; transmitting an authentication responsecorresponding to the authentication request and according to a result ofauthentication based on the information regarding the public key to thefirst other communication apparatus; receiving first information fromthe first other communication apparatus by communication in a case wherethe authentication is successful, wherein the first information isencrypted according to a first key, the first key being generated usingat least the public key; transmitting a search signal for searching fora second other communication apparatus by including the firstinformation; receiving response information which the second othercommunication apparatus responded in accordance with verification on thefirst information included in the search signal received by the secondother communication; executing processing to set, based on at least thefirst information, an encryption key for connecting to a wirelessnetwork constructed by the second other communication apparatus in acase where the response information is received from the second othercommunication apparatus; and connecting to the second othercommunication apparatus after setting the encryption key.